package woaini.fenger.core.bot.communication.base;

import io.azam.ulidj.ULID;
import lombok.Data;
import woaini.fenger.core.bot.id.ID;

import java.util.HashMap;
import java.util.Map;

/**
 * 基本机器人请求
 * @see  woaini.fenger.core.bot.communication.base.BaseBotRequest
 * @author yefeng
 * {@code @Date} 2023-05-16 16:50:39
 */
@Data
public class BaseBotRequest {

    private ID sendUserId;

    private ID sendGroupId;

    /**
     * @see String 行动
     */
    private String action;

    /**
     * @see String 回波
     */
    private String echo;

    /**
     * @see Map <String, Object> 帕拉姆斯
     */
    private Map<String, Object> params;

    public BaseBotRequest() {
        this.params = new HashMap<>();
        this.echo = ULID.random();
    }
    public BaseBotRequest(String action,Map<String, Object> params) {
        this();
        this.action = action;
        this.params.putAll(params);
    }

}
